import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int t = in.nextInt();
        while(t-- != 0) {
            int n = in.nextInt();
            in.nextLine();
            int[][] hash = new int[n][26];
            for(int i = 0; i < n; i++) {
                String s = in.nextLine();
                for(int j = 0; j < s.length(); j++) {
                    char ch = s.charAt(j);
                    hash[i][ch-'a']++;
                }
            }
            int left = 0;
            int right = n - 1;
            boolean flag = true;
            while(left < right) {
                if(check(hash, left, right)) {
                    left++;
                    right--;
                } else {
                    flag = false;
                    break;
                }
            }
            if(flag) {
                System.out.println("Yes");
            } else {
                System.out.println("No");
            }
        }
    }

    public static boolean check(int[][] hash, int left, int right) {
        for(int i = 0; i < 26; i++) {
            if(hash[left][i] != 0 && hash[right][i] != 0) {
                return true;
            }
        }
        return false;
    }
}